﻿using System;
using System.Configuration;

namespace Popw.LiveBlog.Config
{
	public static class Settings
	{
		public const string WidthConstraintConfigKey = "WidthConstraint";
		public const string HeightConstraintConfigKey = "HeightConstraint";
		public const string IsAzureConfigKey = "IsAzure";
		public const string UfcOffsetKey = "UfcOffset";
		public const string UsesDaylightSavingKey = "UsesDaylightSaving";
		public const string BlobContainerNameKey = "BlobContainerName";
		public const string ImageUrlFormatKey = "ImageUrlFormat";
		public const string ServiceBusTopicKey = "ServiceBusTopic";

		public static int WidthConstraint
		{
			get { return Convert.ToInt32(ConfigurationManager.AppSettings[WidthConstraintConfigKey]); }
		}

		public static int HeightConstraint
		{
			get { return Convert.ToInt32(ConfigurationManager.AppSettings[HeightConstraintConfigKey]); }
		}

		public static bool IsAzure
		{
			get { return ConfigurationManager.AppSettings[IsAzureConfigKey].ToLower() == "true"; }
		}

		public static int UfcOffset
		{
			get { return Convert.ToInt32(ConfigurationManager.AppSettings[UfcOffsetKey]); }
		}

		public static bool UsesDaylightSaving
		{
			get { return ConfigurationManager.AppSettings[UsesDaylightSavingKey].ToLower() == "true"; }
		}

		public static string BlobContainerName
		{
			get { return ConfigurationManager.AppSettings[BlobContainerNameKey]; }
		}

		public static string ImageUrlFormat
		{
			get { return ConfigurationManager.AppSettings[ImageUrlFormatKey]; }
		}

		public static string ServiceBusTopic
		{
			get { return ConfigurationManager.AppSettings[ServiceBusTopicKey]; }
		}
	}
}